Fix pruning of partial commits
authorAlexander Larsson <alexl@redhat.com>
Mon, 24 Oct 2016 09:12:15 +0000 (11:12 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 24 Oct 2016 17:48:19 +0000 (17:48 +0000)
commitd0e74cf3af73d6855eebe9c52f19105f7c84df0a
tree367b976fe0e4728c2f50e035accddab311082f5b
parentd3f14f02e3d9f7259c7ec6b25980ae43f03c4906
Fix pruning of partial commits

If we have a partial commit it is not an error for a dirmeta to be
missing (in fact, that is likely), so instead of returning a not-found
error from ostree_repo_traverse_commit() we ignore the error and
continue.

In particular, this means we don't stop early at the first
missing dirmeta, which previously caused ostree_repo_prune() to
thing the dirmetas after that to be unreached and thus purged.

Also, we remove the special casing in ostree_repo_prune() to
not report errors for commitpartial, because these should not
be reported anymore.

This fixes https://github.com/ostreedev/ostree/issues/541

Closes: #542
Approved by: cgwalters
src/libostree/ostree-repo-prune.c
src/libostree/ostree-repo-traverse.c
tests/test-pull-subpath.sh